package com.chry.ocr.common;

import org.apache.log4j.Logger;

//工具类
public class RedisUtil {

	private Logger log = Logger.getLogger(RedisUtil.class);
	//key前缀
	private static final String KEY_PREFIX = "maven-web-demo";
	//key分隔符
	private static final String KEY_SEPARATOR = ":";
	

	public static String keyGenerator(Object operation,Object key){
		StringBuilder sb = new StringBuilder(KEY_PREFIX);
		sb.append(KEY_SEPARATOR)
				 .append(operation != null ? operation.toString() : "")
				 .append(KEY_SEPARATOR)
				 .append(key !=null ? key.toString() : "");
		return sb.toString();
	}
}
